package mirrormonkey.rpc.messages;

import com.jme3.network.Message;
import com.jme3.network.serializing.Serializable;

@Serializable
public class RpcErrorMessage implements Message {

	public int callId;

	public String message;

	public boolean reliable;

	public RpcErrorMessage() {
	}

	public RpcErrorMessage(int callId, Throwable e, boolean reliable) {
		this.callId = callId;
		message = e.getMessage();
	}

	@Override
	public boolean isReliable() {
		return reliable;
	}

	@Override
	public Message setReliable(boolean reliable) {
		this.reliable = reliable;
		return this;
	}

}
